@extends('backend::layout')
@section('title',$page_title)
@section('content')
    <div class="row">
        <div class="col-lg-12">
            @component('backend::component.form.form')
                @slot('form_title') {{$page_title}} @endslot
                @slot('formId') add-notice @endslot
                @slot('action') {{route('b_Notice_create')}} @endslot

                @component('backend::component.form.form-group')
                    @slot('title') 公告标题 @endslot
                    @component('backend::component.form.input')
                        @slot('name') title @endslot
                    @endcomponent
                @endcomponent

                    @component('backend::component.form.form-group')
                        @slot('title') 内容 @endslot
                        @component('backend::component.ckedit')
                            @slot('name') content @endslot
                            @slot('loading_js') true @endslot
                        @endcomponent
                    @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 公告类型 @endslot
                    @slot('remark') 说明:普通公告仅在公告栏显示，紧急公告会弹窗显示 @endslot
                    <div>
                        @foreach(['1'=>'紧急','0'=>'普通'] as $value=>$title)
                            @component('backend::component.radio')
                                @slot('title') {{$title}} @endslot
                                @slot('name') type @endslot
                                @slot('value') {{$value}} @endslot
                                @if($value == 0)
                                    @slot('checked') checked @endslot
                                @endif
                            @endcomponent
                        @endforeach
                    </div>
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 是否发布 @endslot
                    <div>
                        @foreach(['1'=>'是','0'=>'否'] as $value=>$title)
                            @component('backend::component.radio')
                                @slot('title') {{$title}} @endslot
                                @slot('name') is_open @endslot
                                @slot('value') {{$value}} @endslot
                                @if($value == 1)
                                    @slot('checked') checked @endslot
                                @endif
                            @endcomponent
                        @endforeach
                    </div>
                @endcomponent

                @slot('buttons')
                    @component('backend::component.form.button')
                        @slot('title') 提交 @endslot
                        @slot('params') {"formId":"#add-notice"} @endslot
                        @slot('class') btn-min-width ajax-form @endslot
                    @endcomponent
                    @component('backend::component.form.button')
                        @slot('title') 重置 @endslot
                        @slot('type') reset @endslot
                        @slot('color') danger @endslot
                        @slot('class') btn-min-width @endslot
                    @endcomponent
                @endslot
            @endcomponent
        </div>
        <!--/.col-->
    </div>
@endsection